package com.sample.api;

import com.sample.entity.OrderDTO;
import com.swak.App;
import com.swak.annotation.Post;
import com.swak.annotation.RestService;
import com.swak.entity.Result;
import com.swak.rabbit.EventBus;

/**
 * 描述
 * 
 * @author Auto Generator
 * @date 2022-04-21T20:47:07.509267200
 */
@RestService(path = "/api/swak/order", value = "swakMqApi")
public class OrderApi {

	/**
	 * 提交订单
	 * 
	 * @param order
	 * @return
	 */
	@Post("/book")
	public Result<Void> book() {
		EventBus.me().post("Order_queue", "Order_queue", new OrderDTO()
				.setId(App.genId()));
		return Result.success();
	}
}
